<?php

if (!empty($_POST['dlln'])){

require_once '../conf/DbConnectorW.php';
    
$db=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME)
		or die('<p><font color=red>Fehler bei der Datenbankverbindung: '.
		mysqli_connect_errno().': '.mysqli_connect_error().'</p>');

$sql = "INSERT INTO LNDL (DL_Link, Book_Book_ID, Lang_Lang_ID, Extentions_Ext_ID, Creator_Creator_ID) VALUES ('$_POST[dlln]', $_POST[books], $_POST[lang], $_POST[type], $_POST[creator])";

mysqli_query($db, $sql);

mysqli_close($db);

?><div align="center"><p><font color=green>The Link was added to the DB.</p><p><input type="button" value="Close" onclick="window.parent.TINY.box.hide()" ></p></div><?php

} else {
    ?><div align="center"><p><font color=red>You forgot to the Link.</p><p><input type="button" value="Close" onclick="window.parent.TINY.box.hide()" ></p></div><?php
}
?>
